import { _decorator, Component, Node, UITransform, Sprite, Animation, SpriteFrame, AnimationClip, animation } from 'cc'
const { ccclass, property } = _decorator

import { StateMchine } from '../../Base/StateMchine'
import { DirectionStateMchine } from '../../Base/DirectionStateMchine'

import State from '../../Base/State'
import { DIRECTION } from '../../Enums'

const basePath = 'texture/player/blockback'

export class PlayerBlockBackStateMchine extends DirectionStateMchine {
  constructor(fsm: StateMchine) {
    super(fsm)

    this.stateMachines.set(DIRECTION.TOP, new State(fsm, `${basePath}/top`))
    this.stateMachines.set(DIRECTION.BOTTOM, new State(fsm, `${basePath}/bottom`))
    this.stateMachines.set(DIRECTION.LEFT, new State(fsm, `${basePath}/left`))
    this.stateMachines.set(DIRECTION.RIGHT, new State(fsm, `${basePath}/right`))
  }

  // run () {
  // const vale = this.fsm.getPramers(PLAYER_STATE_TYPE_ENUM.DIRECTION)
  // console.log('PlayerTrnLeftStateMchine', vale)
  // this.currentState = this.stateMachines.get(vale as DIRECTION)
  // }
}
